Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use is_empty() instead of len() == x to determine if structs are empty. #69551

Merged
merged 2 commits into from
Feb 29, 2020

Conversation

matthiaskrgr
Copy link
Member

No description provided.

Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I almost want a "has_items()" but that seems like a pain to add, and shouldn't block this.

r=me with nit fixed

src/librustc_codegen_ssa/back/write.rs Outdated Show resolved Hide resolved
@JohnTitor JohnTitor added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Feb 28, 2020
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 28, 2020

📌 Commit 1622b6e has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 28, 2020
bors added a commit that referenced this pull request Feb 29, 2020
Rollup of 6 pull requests

Successful merges:

 - #69477 (docs: add mention of async blocks in move keyword docs)
 - #69504 (Use assert_ne in hash tests)
 - #69546 (use to_vec() instead of .iter().cloned().collect() to convert slices to vecs.)
 - #69551 (use is_empty() instead of len() == x  to determine if structs are empty.)
 - #69563 (Fix no_std detection for target triples)
 - #69567 (use .to_string() instead of format!() macro to create strings)

Failed merges:

r? @ghost
@bors bors merged commit c8db7dc into rust-lang:master Feb 29, 2020
@matthiaskrgr matthiaskrgr deleted the len_zero branch February 29, 2020 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants